import json

import openpyxl
from openpyxl import Workbook
from openpyxl.worksheet.worksheet import Worksheet


class DoExe():
    def doExeRead(self, f, a1, a, b, c, d):
        wk: Workbook = openpyxl.load_workbook(f)
        st: Worksheet = wk[a1]
        ls = [i for i in st.iter_rows(a, b, c, d, values_only=True)]
        return ls


if __name__ == '__main__':
    d = DoExe()
    f = r"D:\2501\apiauto\datas\file\接口测试悟空.xlsx"
    mydata = DoExe().doExeRead(f, "addlog", 2, 12, 3, 7)
    print(mydata)
    mydata = json.loads(mydata[0][4])
    print(mydata)
